import request from '@/utils/request'

// 查询农资管理列表
export function listAgricultural(query) {
  return request({
    url: '/agricultural/agricultural/list',
    method: 'get',
    params: query
  })
}

// 查询农资管理详细
export function getAgricultural(agriculturalId) {
  return request({
    url: '/agricultural/agricultural/' + agriculturalId,
    method: 'get'
  })
}

// 新增农资管理
export function addAgricultural(data) {
  return request({
    url: '/agricultural/agricultural',
    method: 'post',
    data: data
  })
}

// 修改农资管理
export function updateAgricultural(data) {
  return request({
    url: '/agricultural/agricultural',
    method: 'put',
    data: data
  })
}

// 删除农资管理
export function delAgricultural(agriculturalId) {
  return request({
    url: '/agricultural/agricultural/' + agriculturalId,
    method: 'delete'
  })
}
